3.6 \(\int \csc ^2(e+f x) (a+a \sin (e+f x))^2 (c-c \sin (e+f x)) \, dx\)

Optimal. Leaf size=53 \[ \frac{a^2 c \cos (e+f x)}{f}-\frac{a^2 c \cot (e+f x)}{f}-\frac{a^2 c \tanh ^{-1}(\cos (e+f x))}{f}+a^2 (-c) x \]

[Out]

-(a^2*c*x) - (a^2*c*ArcTanh[Cos[e + f*x]])/f + (a^2*c*Cos[e + f*x])/f - (a^2*c*Cot[e + f*x])/f

________________________________________________________________________________________

Rubi [A]  time = 0.120219, antiderivative size = 53, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 7, integrand size = 32, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.219, Rules used = {2950, 2710, 2592, 321, 206, 3473, 8} \[ \frac{a^2 c \cos (e+f x)}{f}-\frac{a^2 c \cot (e+f x)}{f}-\frac{a^2 c \tanh ^{-1}(\cos (e+f x))}{f}+a^2 (-c) x \]

Antiderivative was successfully verified.

[In]

Int[Csc[e + f*x]^2*(a + a*Sin[e + f*x])^2*(c - c*Sin[e + f*x]),x]

[Out]

-(a^2*c*x) - (a^2*c*ArcTanh[Cos[e + f*x]])/f + (a^2*c*Cos[e + f*x])/f - (a^2*c*Cot[e + f*x])/f

Rule 2950

Int[sin[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_) + (d_.)*sin[(e_.) + (f_.)*
(x_)])^(n_.), x_Symbol] :> Dist[a^n*c^n, Int[Tan[e + f*x]^p*(a + b*Sin[e + f*x])^(m - n), x], x] /; FreeQ[{a,
b, c, d, e, f, m}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && EqQ[p + 2*n, 0] && IntegerQ[n]

Rule 2710

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((g_.)*tan[(e_.) + (f_.)*(x_)])^(p_.), x_Symbol] :> Int[Expan
dIntegrand[(g*Tan[e + f*x])^p, (a + b*Sin[e + f*x])^m, x], x] /; FreeQ[{a, b, e, f, g, p}, x] && EqQ[a^2 - b^2
, 0] && IGtQ[m, 0]

Rule 2592

Int[((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> With[{ff = FreeFactors[S
in[e + f*x], x]}, Dist[ff/f, Subst[Int[(ff*x)^(m + n)/(a^2 - ff^2*x^2)^((n + 1)/2), x], x, (a*Sin[e + f*x])/ff
], x]] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n + 1)/2]

Rule 321

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c^(n - 1)*(c*x)^(m - n + 1)*(a + b*x^n
)^(p + 1))/(b*(m + n*p + 1)), x] - Dist[(a*c^n*(m - n + 1))/(b*(m + n*p + 1)), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 3473

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(b*Tan[c + d*x])^(n - 1))/(d*(n - 1)), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \csc ^2(e+f x) (a+a \sin (e+f x))^2 (c-c \sin (e+f x)) \, dx &=(a c) \int \cot ^2(e+f x) (a+a \sin (e+f x)) \, dx\\ &=(a c) \int \left (a \cos (e+f x) \cot (e+f x)+a \cot ^2(e+f x)\right ) \, dx\\ &=\left (a^2 c\right ) \int \cos (e+f x) \cot (e+f x) \, dx+\left (a^2 c\right ) \int \cot ^2(e+f x) \, dx\\ &=-\frac{a^2 c \cot (e+f x)}{f}-\left (a^2 c\right ) \int 1 \, dx-\frac{\left (a^2 c\right ) \operatorname{Subst}\left (\int \frac{x^2}{1-x^2} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-a^2 c x+\frac{a^2 c \cos (e+f x)}{f}-\frac{a^2 c \cot (e+f x)}{f}-\frac{\left (a^2 c\right ) \operatorname{Subst}\left (\int \frac{1}{1-x^2} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-a^2 c x-\frac{a^2 c \tanh ^{-1}(\cos (e+f x))}{f}+\frac{a^2 c \cos (e+f x)}{f}-\frac{a^2 c \cot (e+f x)}{f}\\ \end{align*}

Mathematica [A]  time = 0.0401381, size = 97, normalized size = 1.83 \[ -\frac{a^2 c \sin (e) \sin (f x)}{f}+\frac{a^2 c \cos (e) \cos (f x)}{f}-\frac{a^2 c \cot (e+f x)}{f}+\frac{a^2 c \log \left (\sin \left (\frac{e}{2}+\frac{f x}{2}\right )\right )}{f}-\frac{a^2 c \log \left (\cos \left (\frac{e}{2}+\frac{f x}{2}\right )\right )}{f}+a^2 (-c) x \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[e + f*x]^2*(a + a*Sin[e + f*x])^2*(c - c*Sin[e + f*x]),x]

[Out]

-(a^2*c*x) + (a^2*c*Cos[e]*Cos[f*x])/f - (a^2*c*Cot[e + f*x])/f - (a^2*c*Log[Cos[e/2 + (f*x)/2]])/f + (a^2*c*L
og[Sin[e/2 + (f*x)/2]])/f - (a^2*c*Sin[e]*Sin[f*x])/f

________________________________________________________________________________________

Maple [A]  time = 0.038, size = 72, normalized size = 1.4 \begin{align*} -{a}^{2}cx+{\frac{{a}^{2}c\cos \left ( fx+e \right ) }{f}}-{\frac{{a}^{2}c\cot \left ( fx+e \right ) }{f}}+{\frac{{a}^{2}c\ln \left ( \csc \left ( fx+e \right ) -\cot \left ( fx+e \right ) \right ) }{f}}-{\frac{{a}^{2}ce}{f}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(f*x+e)^2*(a+a*sin(f*x+e))^2*(c-c*sin(f*x+e)),x)

[Out]

-a^2*c*x+a^2*c*cos(f*x+e)/f-a^2*c*cot(f*x+e)/f+1/f*a^2*c*ln(csc(f*x+e)-cot(f*x+e))-1/f*a^2*c*e

________________________________________________________________________________________

Maxima [A]  time = 0.969055, size = 93, normalized size = 1.75 \begin{align*} -\frac{2 \,{\left (f x + e\right )} a^{2} c + a^{2} c{\left (\log \left (\cos \left (f x + e\right ) + 1\right ) - \log \left (\cos \left (f x + e\right ) - 1\right )\right )} - 2 \, a^{2} c \cos \left (f x + e\right ) + \frac{2 \, a^{2} c}{\tan \left (f x + e\right )}}{2 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^2*(a+a*sin(f*x+e))^2*(c-c*sin(f*x+e)),x, algorithm="maxima")

[Out]

-1/2*(2*(f*x + e)*a^2*c + a^2*c*(log(cos(f*x + e) + 1) - log(cos(f*x + e) - 1)) - 2*a^2*c*cos(f*x + e) + 2*a^2
*c/tan(f*x + e))/f

________________________________________________________________________________________

Fricas [A]  time = 2.05983, size = 263, normalized size = 4.96 \begin{align*} -\frac{a^{2} c \log \left (\frac{1}{2} \, \cos \left (f x + e\right ) + \frac{1}{2}\right ) \sin \left (f x + e\right ) - a^{2} c \log \left (-\frac{1}{2} \, \cos \left (f x + e\right ) + \frac{1}{2}\right ) \sin \left (f x + e\right ) + 2 \, a^{2} c \cos \left (f x + e\right ) + 2 \,{\left (a^{2} c f x - a^{2} c \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{2 \, f \sin \left (f x + e\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^2*(a+a*sin(f*x+e))^2*(c-c*sin(f*x+e)),x, algorithm="fricas")

[Out]

-1/2*(a^2*c*log(1/2*cos(f*x + e) + 1/2)*sin(f*x + e) - a^2*c*log(-1/2*cos(f*x + e) + 1/2)*sin(f*x + e) + 2*a^2
*c*cos(f*x + e) + 2*(a^2*c*f*x - a^2*c*cos(f*x + e))*sin(f*x + e))/(f*sin(f*x + e))

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)**2*(a+a*sin(f*x+e))**2*(c-c*sin(f*x+e)),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.2957, size = 185, normalized size = 3.49 \begin{align*} -\frac{6 \,{\left (f x + e\right )} a^{2} c - 6 \, a^{2} c \log \left ({\left | \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) \right |}\right ) - 3 \, a^{2} c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + \frac{2 \, a^{2} c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} + 3 \, a^{2} c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} - 10 \, a^{2} c \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 3 \, a^{2} c}{\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} + \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )}}{6 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^2*(a+a*sin(f*x+e))^2*(c-c*sin(f*x+e)),x, algorithm="giac")

[Out]

-1/6*(6*(f*x + e)*a^2*c - 6*a^2*c*log(abs(tan(1/2*f*x + 1/2*e))) - 3*a^2*c*tan(1/2*f*x + 1/2*e) + (2*a^2*c*tan
(1/2*f*x + 1/2*e)^3 + 3*a^2*c*tan(1/2*f*x + 1/2*e)^2 - 10*a^2*c*tan(1/2*f*x + 1/2*e) + 3*a^2*c)/(tan(1/2*f*x +
 1/2*e)^3 + tan(1/2*f*x + 1/2*e)))/f